﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="ActivityMaster.aspx.cs" Inherits="ActivityMaster" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <style type="text/css">
        .auto-style2 {
            width: 114px;
        }

        .auto-style3 {
            width: 96px;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <table style="width: 100%" id="TABLE1" cellspacing="1" cellpadding="1" border="0">
        <tbody>
            <tr>
                <td style="height: 30px; text-align: center" colspan="3">
                    <table id="TABLE3" style="vertical-align: middle; width: 100%;">
                        <tbody>
                            <tr>
                                <td colspan="2" style="text-align: left;">
                                    <h2>Activity Master</h2>
                                </td>
                            </tr>
                            <tr>
                                <td style="vertical-align: middle; width: 20%;" align="right" class="auto-style3">Activity Name&nbsp;&nbsp;:&nbsp;&nbsp;
                                </td>
                                <td style="width: 30%; vertical-align: middle;">
                                    <asp:TextBox ID="txtActivityName" runat="server" Width="245px" MaxLength="50" OnTextChanged="txtActivityName_TextChanged"></asp:TextBox></td>

                                <td align="left" class="auto-style2" style="width: 50%">&nbsp;
                                            <asp:Button ID="btnSearch" OnClick="BtnSearch_OnClick" runat="server"
                                                Text="Search" CausesValidation="false"></asp:Button>
                                    &nbsp;&nbsp;
                                            <asp:Button ID="btnClear" OnClick="BtnClear_OnClick" runat="server"
                                                Text="Clear" CausesValidation="false"></asp:Button>&nbsp;&nbsp;
                                    <asp:Button ID="btnAddNew" OnClick="btnAddNew_OnClick" runat="server"
                                        Text="Add New Activity" CausesValidation="false"></asp:Button></td>

                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <br />
                </td>
            </tr>
            <tr>
                <td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label runat="server" ID="lblErrorMessage"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="3">
                    <div class="grd_table" style="overflow-x: auto; width: 950px;">
                        <asp:GridView ID="gvActivity" runat="server" DataKeyNames="ActivityID"
                            PageSize="10" AllowPaging="true" Width="60%"
                            AutoGenerateColumns="false" OnPageIndexChanging="gvActivity_PageIndexChanging" OnRowDataBound="gvActivity_RowDataBound" OnRowDeleting="gvActivity_RowDeleting" OnSelectedIndexChanged="gvActivity_SelectedIndexChanged">
                            <Columns>
                                <asp:BoundField DataField="ActivityID" HeaderText="Activity ID" Visible="false">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ActivityTypeID" HeaderText="Activity Type ID" InsertVisible="true" Visible="false">
                                    <ItemStyle Width="0%" HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ActivityName" HeaderText="Activity Name">
                                    <ItemStyle Width="45%" HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ActivityCode" HeaderText="Activity Code">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ActiveStatus" HeaderText="Status">
                                    <ItemStyle Width="12%" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:HyperLinkField DataNavigateUrlFields="ActivityID" DataNavigateUrlFormatString="~/Admin/ActivityMasterModify.aspx?agid={0}&mod=up"
                                    HeaderText="Edit" Text="Edit" ItemStyle-Width="12%" ItemStyle-HorizontalAlign="Left" />
                                <asp:TemplateField HeaderText="Delete">
                                    <ItemStyle Width="12%" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkDelete" CommandArgument='<%# Eval("ActivityID") %>' CommandName="Delete" runat="server"><%# Convert.ToBoolean(Eval("IsActive")) == false ? "Activate" : "Delete"%></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                             <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right" colspan="3">
                    <input id="hdnInput" runat="server" type="hidden" />

                </td>
            </tr>
        </tbody>
    </table>


</asp:Content>

